{% extends "stories/base.html" %}

{% block title %}Content Overview: {{story.headline}}{% endblock %}


{% block main_content %}

<div id="page-preview-blocks">
{% for page in story.pages %}
    <div class="page-preview-block" style="width:240px;float:left;border:1px solid">
        <h2>Page {{page.pagenum}}</h2>
        <p>{{page.content|truncatewords:30}}</p>
        <p style="border-bottom:1px solid">Media</p>
        {%if page.media%}
        <ul>
            {% for item in page.media %}
            <li>{{item}} ({{item.media_type}})</li>
            {% endfor %}
        </ul>
        {%else%}
        --Empty--
        {% endif %}
        <p>{{page.columns|length}} Column{{page.columns|length|pluralize}}</p>
        {# TODO actual preview URL; delete URL #}
        <p><a href="{% url stories_edit_page page.id %}">Edit</a>|<a href="{% url stories_show_story story.slug %}">Preview</a>|<a href="">Delete</a></p>
    </div>
{% endfor %}    
</div>
<div style="clear:both"/>
{% endblock %}